#include "Class.h"

void Stack::Init(int n)
{
	int* tmp = (int*)malloc(sizeof(int) * n);
	if (nullptr == tmp)
	{
		perror("malloc fail");
		return;
	}

	_array = tmp;
	_capacity = n;
	_top = 0;
}